<?php

namespace app\command;

use Workerman\Worker;
use think\console\Input;
use think\console\Output;
use GatewayWorker\Gateway;
use think\console\Command;
use GatewayWorker\Register;

class RegisterWork extends Command
{
    protected function configure()
    {
        $this->setName('register')->setDescription('register start');
    }

    protected function execute(Input $input, Output $output)
    {
        new Register('text://0.0.0.0:' . config('extra.socket.register_port'));
        Worker::runAll();
    }
}
